package com.project.bean;

import java.time.LocalDate;
import java.util.List;

public class PrimaryPostBean {
    private int id;
    private String title;
    private String content;
    private LocalDate createDate=LocalDate.now();
    private UserBean user;
    private List<ReplyBean> list;
    /**回帖数量*/
    private int replyNum;

    public PrimaryPostBean() {
    }

    public PrimaryPostBean(String title, String content, int userId) {
        this.title = title;
        this.content = content;
        this.user=new UserBean();
        this.user.setId(userId);
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public LocalDate getCreateDate() {
        return createDate;
    }

    public void setCreateDate(LocalDate createDate) {
        this.createDate = createDate;
    }

    public UserBean getUser() {
        return user;
    }

    public void setUser(UserBean user) {
        this.user = user;
    }

    public List<ReplyBean> getList() {
        return list;
    }

    public void setList(List<ReplyBean> list) {
        this.list = list;
    }

    public int getReplyNum() {
        return replyNum;
    }

    public void setReplyNum(int replyNum) {
        this.replyNum = replyNum;
    }

    @Override
    public String toString() {
        return "PrimaryPostBean{" +
                "id=" + id +
                ", title='" + title + '\'' +
                ", content='" + content + '\'' +
                ", createDate=" + createDate +
                ", user=" + user +
                ", list=" + list +
                ", replyNum=" + replyNum +
                '}' + "\n";
    }
}
